home *** CD-ROM | disk | FTP | other *** search
- Programmer's Edge Universal Textboxes User Document
- Copyright 1998, W. David Ewing
-
- I wrote the Programmer's Edge boxes for use in database applications using VB 5.0. They give the
- basic textbox functionality found in VB, then extend that functionality to allow the
- special data formats which I seem to need the most. This document assumes you have a
- basic understanding of the VB standard text box already, it also assumes that you have
- VB version 5.0 with at least service pack 2 loaded on your computer already.
-
- To use the control, just put the EDGETEXT.OCX file in your Windows\System directory,
- then from a DOS command line type > c:\windows\system\regsvr32 c:\windows\system\EDGETEXT.ocx
- This will register the ocx so that it will appear in your Project / Components menu in
- the VB design time environment. It will be called Programmer's Edge by Dave Ewing. Just check the
- check box in the components menu next to this item, and you will see the tool box icons for
- the Programmer's Edge boxes appear in your toolbar. You are then ready to drag one onto a form, and
- try them out.
-
- Here are the different types of text boxes available:
-
- Standard Edge TextBox: This text box allows lots of formatting capabilities which
- database programmers usually have to write. In the custom properties
- page, you can tell the box to just accept numeric input, or maybe tell
- it to only accept capital letters. Each of the check boxes in the
- custom properties page represent input that a user may make. Clicking
- that any particular check box is allowing the user to input that
- particular key set.
-
- Currency Text Box: This special textbox allows currency input. It is only in dollars
- right now. If I get a good response to the controls, I will
- try to include international currency support in the next release.
- Use the Value property to read and write raw numbers into the box,
- and use the Text property to read and write actual currency formatted
- text.
-
- Percent Text Box: A lot of the programs I have written are for financial institutions.
- I need the percent text box for these applicaions. It works much the
- same way as currency. To read or write raw numbers into the box, use
- the Value property. The Text property allows input of formatted text
- in the form a percentages. This box does not convert from decimal,
- for instance, if you put a value of .1 into the Value property, this
- means .1% not 10%.
-
- Social Security Box: This box is used for Social Security number input. It is pretty self
- explanatory, and doesn't have a lot of fancy formatting. Just set
- the social security numbers with dashes into the Text property, or
- set the raw numbers into the Value property. If the Blink On Error
- property is set, it will blink if an invalid value is entered.
-
- Telephone Box: This box supports several different Telephone number formats. It
- can be set using the Format Mask property to accept 7 digit, 12 digit,
- 16 digit, etc. phone numbers. Formatted telephone number text
- may be inputted through the Text property, and raw telephone numbers
- can be read and written with the Value property. If an invalid
- telephone number is inputted, and the Blink On Error property is set,
- then the field will blink and the Blink property will be set so
- that the programmer is notified as well.
-
- Date Box: This box can be set using the Format Mask property so that it can
- represent Dates, Times or many combinations of both. I have tried
- to include the most popular formats of dates and times. The text
- and value properties of this box behave very similarly. The Blink
- property of this box is probably more useful than on any other
- because of the pecularities of dates and their formats.
-
- Zip Box: This box can be set using the Format Mask property, to allow input
- of the most popular US Zip Code formats. It has two additional
- properties for handling the zip codes. In addition to Text and Value.
- It also has Zip4 and Zip5 properties. This properties allow raw formatting
- of the zip code into its two components since many databases store
- them in this fashion.
-
- When using these controls, it is important to specify the property you want by name. In
- a standard textbox, for instance, Textbox.Text is implied if you just call the Textbox
- by name. Programmer's Edge boxes; however, don't have default properties, so you must specify
- that you want EdgeText.Text or EdgeText.Value.
-
- Here are some of the properties which the different Programmer's Edge boxes have:
-
- BLINK: This property allows the programmer to read and write the blink feature of
- the Programmer's Edge boxes. For the special purpose boxes such as Currency,Date,
- Telephone,SocialSecurity,Percent and Zip, Blink will be set if a user enters
- an invalid value. Data Validity may be checked by seeing if the Blink
- property has been set to True. This may also be done manually in the
- Programmer's Edge Box so that in the Lost_Focus event, For Instance, the programmer
- could check the user's input, and if it is invalid, Blink could be set
- to True to show the user that their input is invalid.
-
- BLINK ON ERROR: This can be set to false on the special text boxes so that the boxes won't
- blink when invalid data is inputted. Several of the boxes just will not
- allow the user to input invalid data, but invalid data can still come from
- the database, if it was not monitored well. So the Text and Value properties
- can trigger Blinking as well.
-
- TEXT: This works the same as on a regular text box. The biggest differences are
- that the Blink property can be set if invalid data is written. In currency,
- for instance, putting letters into the Text property would start the box
- Blinking. Also be aware of zeroes. If a zero is entered into this field,
- it is assumed to be invalid on many of the boxes. This is because since it
- is assumed that formatted text is being read and written to this property,
- a blank string value would be the equivalent of zero.
-
- VALUE: This property is read or written using raw numbers. Some examples are, the
- currency box where $123.00 would be inputted to the Text property, but
- 123.00 would be inputted or read from the Value property. This is the
- same in Social Security, Telephone, Zip and Percent. The only boxes which
- this property is only somewhat useful are Programmer's Edge, and Date. Also be aware
- that the Blinking works opposite of the Text property in that if a Zero is
- written to this property, the box assumes the data is ok on most of the boxes,
- but if a blank string is written to the property, it will start the box
- Blinking
-
- CHARS: This property represents the character mask which allows different types
- of user input. It is only used on the Programmer's Edge box. Usually you wouldn't
- set this directly because the numbers it uses are a little cryptic.
- It is much easier to set the check boxes in the custom properties page.
-
- CHARTABLE: This property is only used when the Use Char Table check box on the custom
- property page is checked. When this checkbox is checked, any character
- which is put into this field will then be allowed for user entry.
-
- MAXCHARS: This is the maximum number of characters allowed in the text box. Be aware
- that This is not checked; however, when the values are put in through
- the Text property or value property of the Programmer's Edge box. It is assumed
- that the programmer sets this text before putting it into the box.
-
- FOCUSSELECT: This property can be set to true or false. When set to true, the text in
- the textbox will automatically be selected on the Got_Focus event. This
- is something I always found myself coding for every text box on a form.
- It sure is a lot nicer to just have the control do it for me.
-
- ESCAPECLEAR: This property can also be set to true or false. It will allow the user
- to clear the box just by hitting the escape key even if the text in the
- box is not selected.
-
- FORMATMASK: This property is used on the Date, Telephone and Zip boxes. It sets the
- mask of the boxes, for instance, on the date box, you can set this to
- MM/DD/YYYY, MM/DD/YY, HH:MM:SS, etc., on the Telephone box it can be set
- to 999-9999, or 999-999-9999 etc., on the Zip box, it can be set to
- 99999, or 99999-9999 etc.
-
- READONLY: If this property is set to True, no user input will be allowed, but input
- through the Text and Value properties will still be possible.
-
-
- The other properties of the boxes are the same properties which are available on the
- standard VB text boxes, and they work in the same manner. You will notice a few properties
- which are missing. I hope to make these properties available in the next release, if I get
- enough interest in the controls. I enjoyed building the controls, and I will be continuously
- improving them. I know of several other properties I would personally like to see in the
- controls, but sooner or later you have to release what you have, and see if it will help
- anyone else.
-
- These controls have saved me countless hours desgning and building Database VB apps. I hope
- they save you as much time as they have saved me. If you have any questions about the controls,
- or if you have feature recommendations for the next release, you can E-Mail me at
-
- k4de@hotmail.com
-
- I will try to respond as quickly as I can to your messages. You can find out how to register
- the program in the Order info screen, and be sure to read the license.txt file for distribution,
- licensing and warranty information.
-
- Thanks,
-
- Dave Ewing
- PO Box 1352
- Holly Springs, NC 27540-1352
- E-Mail k4de@mindspring.com